<div class="main_bd">

    <div class="panel panel_overview">
        <div class="panel__hd">
            <h3 class="panel__title">竞价排名</h3></div>
        <div class="panel__bd">

            <!--<div class="filter-box">-->
            <!--<a href="/group/select" class="btn btn_primary">新建拼团</a>-->
            <!--</div>-->
            <form id="filter-form" style="text-align: center">
                <input value="{$keyword}" id="word" name="wrod"
                       style="height: 30px;line-height: 30px;width: 30%;padding-left: 5px;" type="text" maxlength="15"/>
                <div onclick="filterFun()" class="btn btn_default margin10-c">搜索</div>
                <div onclick="buyFun()" class="btn btn_primary">出价</div>
            </form>
            <div style="height: 20px;"></div>
            {if $list }
            <table style="width: 100%" class="info-list">
                <tr>
                    <th>序号</th>
                    <th>公司名称</th>
                    <th>价格</th>
                    <th>出价时间</th>
                </tr>
                {volist name="list" id="spread"  }
                <tr>
                    <td>{$i}</td>
                    <td>{$spread.user.company}</td>
                    <td>{$spread.price}</td>
                    <td>{$spread.create_time}</td>
                </tr>
                {/volist}
            </table>
            {else}
            {if $keyword}
            该关键词暂时没有人竞价哦，赶紧下手吧
            {/if}
            {/if}
        </div>
    </div>
</div>
<script>
    function filterFun() {

        var word = null;
        word = $('#word').val()
        if(!word){
            layer.msg('输入要竞价的关键词');
            return
        }
        location.href = '/spread?keyword='+word;


    }

    function buyFun() {
        var word = null;
        word = $('#word').val()
        if(!word){
            layer.msg('输入要竞价的关键词');
            return ;
        }
       location.href = '/spread/buy?keyword='+word;

    }
</script>
